#pragma once
#include "SgComposite.h"
#include "graphics/OpenGLWnd.h"
#include <vector>
class CSgTransform :
	public CSgComposite
{
public:
	CSgTransform(void);
	~CSgTransform(void);
	void SetTranslate(double x, double y, double z){m_tx=x; m_ty=y; m_tz=z;}
	//CSgTranslate(double x, double y, double z, CSgObject *p_child) //Why *p_child here? What it means? <-Yang
	//{m_x=x; m_y=y; m_z=z;m_child=p_child;}
	void SetRotate(double angle, double x, double y, double z){
		m_angle=angle;
		m_rx=x;
		m_ry=y;
		m_rz=z;
	}
	void SetScale(double x, double y, double z){
		m_sx=x;
		m_sy=y;
		m_sz=z;
	}
	virtual void Render();
	//void AddChild(CSgPtr<CSgObject> m_child){m_children.push_back(m_child);} 

private:
	//CSgPtr<CSgObject> m_child;
	double m_tx, m_ty, m_tz;
	double m_angle, m_rx, m_ry, m_rz;
	double m_sx, m_sy, m_sz;
	std::vector<CSgPtr<CSgObject> > m_children;
};
